<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>2656：[Zjoi2012]数列(sequence)</title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[Zjoi2012]数列(sequence)</a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[Zjoi2012]数列(sequence)</span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                [Zjoi2012]数列(sequence)                </h1>
                <p>时间限制：2s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：128MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><p><span style="font-size: 10.5pt">&nbsp;&nbsp; </span><span style="font-size: 12pt">小白和小蓝在一起上数学课，下课后老师留了一道作业，求下面这个数列的通项公式：</span></p>
<p><span style="font-size: 12pt"><img height="182" alt="" width="288" src="../file/2656_0.jpg" /></span></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp; </font></span></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">小白作为一个数学爱好者，很快就计算出了这个数列的通项公式。于是，小白告诉小蓝自己已经做出来了，但为了防止小蓝抄作业，小白并不想把公式公布出来。于是小白为了向小蓝证明自己的确做出来了此题以达到其炫耀的目的，想出了一个绝妙的方法：即让小蓝说一个正整数</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">N</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">，小白则说出</span><span lang="EN-US" style="position: relative; top: 4pt; mso-text-raise: -4.0pt"><v:shape id="_x0000_i1025" type="#_x0000_t75" style="width: 12.75pt; height: 15.75pt"><font face="Calibri"> <v:imagedata chromakey="white" o:title="" src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\01\clip_image001.png"></v:imagedata></font></v:shape></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">的值，如果当</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">N</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">很大时小白仍能很快的说出正确答案，这就说明小白的确得到了公式。但这个方法有一个很大的漏洞：小蓝自己不会做，没法验证小白的答案是否正确。作为小蓝的好友，你能帮帮小蓝吗？</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><o:p></o:p></span></p>
<p></p></p><hr/><h3>输入格式</h3><p><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">输入文件第一行有且只有一个正整数</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">T</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">，表示测试数据的组数。</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%"><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">第</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">2</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">～</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">T+1</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">行，每行一个<u>非负整数</u></span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">N</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">。</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%"><span lang="EN-US"><o:p></o:p></span></p></p><hr/><h3>输出格式</h3><p><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">输出文件共包含</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">T</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">行。</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 30pt; line-height: 150%; mso-char-indent-count: 2.5"><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">第</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">i</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">行应包含一个<u>不含多余前缀</u></span><u><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">0</font></span></u><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">的数，它的值应等于</span><span lang="EN-US" style="position: relative; top: 4pt; mso-text-raise: -4.0pt">An</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">(n</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">为输入数据中第</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">i+1</font></span><span style="font-size: 12pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">行被读入的整数</span><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">)<o:p></o:p></font></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%"><span style="font-size: 14pt; line-height: 150%; font-family: 宋体; mso-bidi-font-size: 11.0pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri">【样例输入】</span><span lang="EN-US" style="font-size: 14pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: 150%"><span lang="EN-US"><o:p></o:p></span></p></p><hr/><h3>样例输入</h3><pre>      3

     1

     3

     10

</pre><hr/><h3>样例输出</h3><pre>1
2
3

 
</pre><hr/><h3>提示</h3><p><p class="MsoNormal" style="margin: 0cm 0cm 0pt; text-indent: 12pt; line-height: 150%; mso-char-indent-count: 1.0"><span lang="EN-US" style="font-size: 12pt; line-height: 150%; mso-bidi-font-size: 11.0pt"><font face="Calibri">T&lt;=20,N&lt;=10^100<o:p></o:p></font></span></p></p><hr/><h3>题目来源</h3><p>没有写明来源</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=2656" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=2656" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>